/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pruebas;
import java.util.*;
/**
 *
 * @author ddpc
 */
public class mayorymenor {
    Scanner teclado;
    int [] a;
    public void ordena(){
       a = new int[3];
       teclado = new Scanner(System.in);
        for (int i = 0; i < 3; i++) {
            System.out.println("Inserte numero:");
            a[i] = teclado.nextInt();
        }
        Arrays.sort(a);
    }
    public void Imprime(){
        System.out.println("el menor es: "+a[0]);
        System.out.println("el mayor es: "+a[a.length-1]);
    }
    public static void main(String[] args) {
        mayorymenor x  = new mayorymenor();
        x.ordena();
        x.Imprime();
    }

}
